Palette Config on Tomcat

Create a new instance of server by changing the port numbers in server.xml file to avoid conflicts with other instances if any. Create a directory by name uploads. The shared folder should be created with two folders namely conf and lib where the necessary configuration files required for running the PaletteConfig application will be placed. Create a file PaletteWebApplication.properties in the conf subdirectory. Open the PaletteWebApplication.properties file and add/edit the download.dir property to point to the uploads folder.

PaletteWebApplication.properties

Port Configuration

download.dir=D:\\Tomcat_Server_WorkSpace\\apache-tomcat-10.1.55\\uploads
download.dir=/scratch/Servers/Tomcat/uploads

Creating Data Sources and Connection Factory

<App_ContextName>.xml is the file where all the data sources are defined. Any data source, which is needed by an application to run, has to be configured in this file. PaletteConfig requires PALETTECONFIGDS, PALETTECONFIGIVSDS data sources to be created.

<%CATALINA_BASE%>\conf\Catalina\<HostName>\<App_DeploymentName>.xml. Catalina scans that directory and read the web application Context at runtime.

Note: Please create PaletteConfig.xml under<%CATALINA_BASE%>\conf\Catalina\<HostName> and Please update jdbcDriver, jdbcUrl properties accordingly for the respective Databases.

Sample configuration of all the data sources which are required for PaletteConfig to run:

Data Sources

Note: Below configuration is a sample for Oracle DB. Please update jdbcDriver, jdbcUrl properties accordingly for the respective Databases

PaletteConfig.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context>
	<Resource name="PALETTECONFIGDS"
	auth="Container"
	type="javax.sql.DataSource"
	driverClassName="oracle.jdbc.OracleDriver"
	url="jdbc:oracle:thin:@localhost:1521:FREE"
	username="OIPASIT"
	password="OIPASIT"
	maxTotal="50"
	maxIdle="10"
	maxWaitMillis="-1"
	validationQuery="SELECT 1 FROM DUAL"
	testOnBorrow="true" />
 
	<Resource name="PALETTECONFIGIVSDS"
	auth="Container"
	type="javax.sql.DataSource"
	driverClassName="oracle.jdbc.OracleDriver"
	url="jdbc:oracle:thin:@localhost:1521:FREE"
	username="OIPASIT"
	password="OIPASIT"
	maxTotal="50"
	maxIdle="10"
	maxWaitMillis="-1"
	validationQuery="SELECT 1 FROM DUAL"
	testOnBorrow="true" />
</Context>

Configuring Ports

The server.xml should be configured with unique port numbers

Server.xml

Port Configuration

<Connector port="8086" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8805"  maxParameterCount="1000" xpoweredBy="false" server="Apache TomEE" />

The catalina.properties file in the conf folder needs to be modified so as to make the Tomcat container to pick custom configuration or jars defined by user.

Application shared/lib folders

shared.loader=${catalina.home}/shared/conf

Deploying PaletteConfig

  • Rename the Palette Config war from the distribution to PaletteConfig.war.

  • Deploy PaletteConfig war in webapps folder of Tomcat server.

  • Finally start the server and test the deployment with the following url:

http://hostname:port/PaletteConfig/

Note: If you change the context name, use that name in the URL instead of PaletteConfig.

Document Generator (Additional Changes)

Refer OIPA Document Generator for more details.

Installation

Note: JDK21 does not have a fonts directory inside jdk/lib directory. Hence the fonts folder has been shipped in OIPA distribution.

  • For tomEE, tomcat and weblogic environments, fonts folder has to be placed on jdk/libs folder at OS level, i.e. /usr/java/jdk-21.0.11/lib.

  • For Liberty environment, fonts folder has to be placed in jdk/libs folder inside liberty environment, i.e. /scratch/oipa/IBM/WebSphere/Liberty/java/21/jdk-21.0.x/lib

Required Libraries

OIPA expects crystal runtime libraries for Document Generator functionality. Below listed libraries from crjava-runtime_12.3.219.zip must be placed in the class loader of the application server. Each of these files is included with Crystal Reports and not included with OIPA.

  • Copy the CR libraries into the shared\crlib directory of TomEE

Commons-collections-3.2.2.jar commons-configuration-1.2.jar commons-logging-1.2-1e55e8f.jar commons-lang-2.1.jar
CrystalCommon2.jar CrystalReportsRuntime.jar DatabaseConnectors.jar log4j.jar
logging.jar icu4j-4.6.jar JDBInterface.jar keycodeDecoder.jar

The catalina.properties file in the conf folder needs to be modified so as to make the TomEE container to pick custom configuration or CR jars defined by user.

Application shared/lib folders

shared.loader=${catalina.home}/shared/crlib/*.jar,${catalina.home}/shared/conf